// Define all routes for the Medical CRM application
const routes = [
  {
    path: '/',
    redirect: '/dashboard',
  },
  {
    path: '/dashboard',
    name: 'Dashboard',
    component: () => import('../views/Dashboard.vue'),
    meta: {
      title: '仪表盘',
      icon: 'Odometer'
    }
  },
  {
    path: '/patients',
    name: 'Patients',
    component: () => import('../views/patients/PatientList.vue'),
    meta: {
      title: '患者管理',
      icon: 'User'
    }
  },
  {
    path: '/patients/:id',
    name: 'PatientDetail',
    component: () => import('../views/patients/PatientDetail.vue'),
    meta: {
      title: '患者详情',
      hidden: true
    }
  },
  {
    path: '/medical-services',
    name: 'MedicalServices',
    component: () => import('../views/medical-services/MedicalServicesIndex.vue'),
    meta: {
      title: '医疗服务',
      icon: 'FirstAidKit'
    },
    children: [
      {
        path: 'treatments',
        name: 'Treatments',
        component: () => import('../views/medical-services/Treatments.vue'),
        meta: {
          title: '诊疗方案'
        }
      },
      {
        path: 'prescriptions',
        name: 'Prescriptions',
        component: () => import('../views/medical-services/Prescriptions.vue'),
        meta: {
          title: '处方管理'
        }
      },
      {
        path: 'packages',
        name: 'MedicalPackages',
        component: () => import('../views/medical-services/MedicalPackages.vue'),
        meta: {
          title: '医疗套餐'
        }
      },
      {
        path: 'physical-exam',
        name: 'PhysicalExamPackages',
        component: () => import('../views/medical-services/PhysicalExamPackages.vue'),
        meta: {
          title: '体检套餐'
        }
      },
      {
        path: 'rehabilitation',
        name: 'RehabilitationServices',
        component: () => import('../views/medical-services/RehabilitationServices.vue'),
        meta: {
          title: '康复服务'
        }
      }
    ]
  },
  // 暂时注释掉不存在的门诊管理路由
  /*
  {
    path: '/clinic',
    name: 'Clinic',
    component: () => import('../views/clinic/ClinicIndex.vue'),
    meta: {
      title: '门诊管理',
      icon: 'Calendar'
    },
    children: [
      {
        path: 'appointments',
        name: 'Appointments',
        component: () => import('../views/clinic/Appointments.vue'),
        meta: {
          title: '预约排期'
        }
      },
      {
        path: 'visits',
        name: 'Visits',
        component: () => import('../views/clinic/Visits.vue'),
        meta: {
          title: '就诊分析'
        }
      }
    ]
  },
  */
  // 暂时注释掉不存在的随访服务路由
  /*
  {
    path: '/follow-up',
    name: 'FollowUp',
    component: () => import('../views/follow-up/FollowUpIndex.vue'),
    meta: {
      title: '随访服务',
      icon: 'Bell'
    },
    children: [
      {
        path: 'records',
        name: 'FollowUpRecords',
        component: () => import('../views/follow-up/Records.vue'),
        meta: {
          title: '随访记录'
        }
      },
      {
        path: 'health-education',
        name: 'HealthEducation',
        component: () => import('../views/follow-up/HealthEducation.vue'),
        meta: {
          title: '健康教育'
        }
      }
    ]
  },
  */
  // 数据分析路由
  {
    path: '/reports',
    name: 'Reports',
    component: () => import('../views/reports/ReportIndex.vue'),
    meta: {
      title: '数据分析',
      icon: 'DataAnalysis'
    },
    children: [
      {
        path: 'medical',
        name: 'MedicalReport',
        component: () => import('../views/reports/MedicalReport.vue'),
        meta: {
          title: '医疗数据报表'
        }
      },
      {
        path: 'doctor',
        name: 'DoctorReport',
        component: () => import('../views/reports/DoctorReport.vue'),
        meta: {
          title: '医生业绩报表'
        }
      },
      {
        path: 'ai-analytics',
        name: 'AIAnalytics',
        component: () => import('../views/reports/AIAnalytics.vue'),
        meta: {
          title: 'AI 智能分析'
        }
      }
    ]
  },
  {
    path: '/:pathMatch(.*)*',
    name: 'NotFound',
    component: () => import('../views/NotFound.vue'),
    meta: {
      hidden: true
    }
  }
]

export default routes 